﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using MyModels;

namespace MyApi.Controllers
{
    /// <summary>
    /// 首页
    /// </summary>
    [Route("api/[controller]")]
    [ApiController]
    [Authorize("Permission")]
    public class HomeController : BaseApiController
    {

        /// <summary>
        /// 获取首页数据
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<MessageModel<string>> GetHome()
        {
            return Success("home", "获取首页数据成功");
        }
    }
}
